package com.hongye.furniture.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hongye.furniture.mapper.HyFurnitureMapper;
import com.hongye.furniture.domain.HyFurniture;
import com.hongye.furniture.service.IHyFurnitureService;

/**
 * 家具列表Service业务层处理
 * 
 * @author 白杨
 * @date 2025-02-14
 */
@Service
public class HyFurnitureServiceImpl implements IHyFurnitureService 
{
    @Autowired
    private HyFurnitureMapper hyFurnitureMapper;


    /**
     * 根据区县id获取该区下所有的家具
     */
    public List<HyFurniture> findFurnitureByRegionId(Long categoryId)
    {
        return hyFurnitureMapper.findFurnitureByCategoryId(categoryId);
    }


    /**
     * 查询家具列表
     * 
     * @param id 家具列表主键
     * @return 家具列表
     */
    @Override
    public HyFurniture selectHyFurnitureById(Long id)
    {
        return hyFurnitureMapper.selectHyFurnitureById(id);
    }

    /**
     * 查询家具列表列表
     * 
     * @param hyFurniture 家具列表
     * @return 家具列表
     */
    @Override
    public List<HyFurniture> selectHyFurnitureList(HyFurniture hyFurniture)
    {
        return hyFurnitureMapper.selectHyFurnitureList(hyFurniture);
    }

    /**
     * 新增家具列表
     * 
     * @param hyFurniture 家具列表
     * @return 结果
     */
    @Override
    public int insertHyFurniture(HyFurniture hyFurniture)
    {
        return hyFurnitureMapper.insertHyFurniture(hyFurniture);
    }

    /**
     * 修改家具列表
     * 
     * @param hyFurniture 家具列表
     * @return 结果
     */
    @Override
    public int updateHyFurniture(HyFurniture hyFurniture)
    {
        return hyFurnitureMapper.updateHyFurniture(hyFurniture);
    }

    /**
     * 批量删除家具列表
     * 
     * @param ids 需要删除的家具列表主键
     * @return 结果
     */
    @Override
    public int deleteHyFurnitureByIds(Long[] ids)
    {
        return hyFurnitureMapper.deleteHyFurnitureByIds(ids);
    }

    /**
     * 删除家具列表信息
     * 
     * @param id 家具列表主键
     * @return 结果
     */
    @Override
    public int deleteHyFurnitureById(Long id)
    {
        return hyFurnitureMapper.deleteHyFurnitureById(id);
    }
}
